#!/bin/bash
export HADOOP_CLASSPATH=`hadoop classpath`
flink_bin_dir=/opt/cloudera/parcels/FLINK/lib/flink/bin/
flink_app_dir=/opt/module/flink-app/digitalize
flink_app_name=digitalize-push-crm
flink_yarn_queue=root.flink
flink_app_jar_name=digitalize-push-crm-1.0-SNAPSHOT-jar-with-dependencies.jar
flink_job_heap=1024m
flink_task_heap=2048m
flink_parallelism=3
main_class=com.nucarf.bi.digtalize.DigitalizePushCrm

$flink_bin_dir/flink run \
    -yD env.java.opts="-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8" \
    -m yarn-cluster \
    -ynm $flink_app_name \
    -p $flink_parallelism \
    -yqu $flink_yarn_queue \
    -yjm $flink_job_heap \
    -ytm $flink_task_heap \
    -c $main_class $flink_app_dir/$flink_app_jar_name
